<%@ page language="java" contentType="text/html; charset=gb2312"
    pageEncoding="gb2312"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">

<jsp:useBean id="mybean" scope="session" class="com.test.usebean.NameHandler"/> 

<%
	request.setCharacterEncoding("gb2312");
	String username=request.getParameter("username"); 
%>

<jsp:setProperty name="mybean" property="username" value="<%=username%>" />
<html>
<head>
<title>hello javabean</title>
</head>
<body>
	<h1>Hello,<jsp:getProperty name="mybean" property="username" /></h1>
</body>
</html>